package com.zyb.beidada.model.enums;

/**
 * @author 十八岁讨厌编程
 * @date 2025/5/5 14:18
 * @PROJECT_NAME beidada-backend
 * @description  评分策略（0-自定义，1-AI）
 */

public enum ScoringStrategyEnum {
    /**
     * 自定义
     */
    CUSTOM(0),

    /**
     * AI
     */
    AI(1);

    private final Integer value;

    ScoringStrategyEnum(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static ScoringStrategyEnum fromValue(Integer value) {
        for (ScoringStrategyEnum strategy : ScoringStrategyEnum.values()) {
            if (strategy.getValue().equals(value)) {
                return strategy;
            }
        }
        throw new IllegalArgumentException("Unknown value: " + value);
    }
}
